package com.xiaoge.system.entity;

import cn.afterturn.easypoi.excel.annotation.Excel;
import com.baomidou.mybatisplus.annotation.*;

import java.util.Date;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 角色表
 * </p>
 *
 * @author xiaoge
 * @since 2021-02-02
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("tb_role")
@ApiModel(value="Role对象", description="角色表")
public class Role implements Serializable {

    private static final long serialVersionUID = 1L;

    @Excel(name = "id")
    @ApiModelProperty(value = "角色ID")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @Excel(name = "角色名称",width = 20)
    @ApiModelProperty(value = "角色名称")
    private String roleName;

    @Excel(name = "角色描述",width = 30)
    @ApiModelProperty(value = "角色描述")
    private String remark;

    @Excel(name = "创建时间", width = 30, format = "yyyy-MM-dd hh:mm:ss")
    @TableField(fill = FieldFill.INSERT)
    @ApiModelProperty(value = "创建时间")
    private Date createTime;

    @Excel(name = "修改时间", width = 30, format = "yyyy-MM-dd hh:mm:ss")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    @ApiModelProperty(value = "修改时间")
    private Date modifiedTime;

    @Excel(name = "是否可用", replace = {"不可用_0", "可用_1"})
    @ApiModelProperty(value = "是否可用,0:不可用，1：可用")
    private Integer status;
}
